#include "Student_info.h"

using namespace std;

//TODO

bool compare(const Student_info &x, const Student_info &y){
    return x.name() < y.name();
}

Student_info::Student_info(): midterm(0), final(0) {}

Student_info::Student_info(std::istream &is){
	read(is);
}

std::istream & Student_info::read(std::istream &is){
	is >> n >> midterm >> final;
	read_hw(is);
	return is;
}
std::istream &Student_info::read_hw(std::istream &in){
    homework.clear();
    if (in){
		double x;
		while (in >> x){
			homework.push_back(x);
		}
		in.clear();
	}
    return in;
}